3.567 \(\int \frac{\sqrt{a+a \sin (e+f x)}}{\sqrt{c+d \sin (e+f x)}} \, dx\)

Optimal. Leaf size=61 \[ -\frac{2 \sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a} \sqrt{d} \cos (e+f x)}{\sqrt{a \sin (e+f x)+a} \sqrt{c+d \sin (e+f x)}}\right )}{\sqrt{d} f} \]

[Out]

(-2*Sqrt[a]*ArcTan[(Sqrt[a]*Sqrt[d]*Cos[e + f*x])/(Sqrt[a + a*Sin[e + f*x]]*Sqrt[c + d*Sin[e + f*x]])])/(Sqrt[
d]*f)

________________________________________________________________________________________

Rubi [A]  time = 0.0925582, antiderivative size = 61, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.069, Rules used = {2775, 205} \[ -\frac{2 \sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a} \sqrt{d} \cos (e+f x)}{\sqrt{a \sin (e+f x)+a} \sqrt{c+d \sin (e+f x)}}\right )}{\sqrt{d} f} \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[a + a*Sin[e + f*x]]/Sqrt[c + d*Sin[e + f*x]],x]

[Out]

(-2*Sqrt[a]*ArcTan[(Sqrt[a]*Sqrt[d]*Cos[e + f*x])/(Sqrt[a + a*Sin[e + f*x]]*Sqrt[c + d*Sin[e + f*x]])])/(Sqrt[
d]*f)

Rule 2775

Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]/Sqrt[(c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]], x_Symbol] :> Dist[
(-2*b)/f, Subst[Int[1/(b + d*x^2), x], x, (b*Cos[e + f*x])/(Sqrt[a + b*Sin[e + f*x]]*Sqrt[c + d*Sin[e + f*x]])
], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{\sqrt{a+a \sin (e+f x)}}{\sqrt{c+d \sin (e+f x)}} \, dx &=-\frac{(2 a) \operatorname{Subst}\left (\int \frac{1}{a+d x^2} \, dx,x,\frac{a \cos (e+f x)}{\sqrt{a+a \sin (e+f x)} \sqrt{c+d \sin (e+f x)}}\right )}{f}\\ &=-\frac{2 \sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a} \sqrt{d} \cos (e+f x)}{\sqrt{a+a \sin (e+f x)} \sqrt{c+d \sin (e+f x)}}\right )}{\sqrt{d} f}\\ \end{align*}

Mathematica [C]  time = 1.2394, size = 305, normalized size = 5. \[ -\frac{i \sqrt{a (\sin (e+f x)+1)} \left (\cos \left (\frac{1}{2} (e+f x)\right )-i \sin \left (\frac{1}{2} (e+f x)\right )\right ) \left (\log \left (\frac{e^{-i e} \left (2 \sqrt{d} \sqrt{2 c e^{i (e+f x)}-i d \left (-1+e^{2 i (e+f x)}\right )}+2 \sqrt [4]{-1} c-2 (-1)^{3/4} d e^{i (e+f x)}\right )}{\sqrt{d}}\right )-\log \left (-\frac{(1+i) f e^{\frac{1}{2} i (e-2 f x)} \left (-\sqrt{d} \sqrt{2 c e^{i (e+f x)}-i d \left (-1+e^{2 i (e+f x)}\right )}+(-1)^{3/4} c e^{i (e+f x)}-\sqrt [4]{-1} d\right )}{\sqrt{d}}\right )\right ) \sqrt{(\cos (e+f x)+i \sin (e+f x)) (c+d \sin (e+f x))}}{\sqrt{d} f \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right ) \sqrt{c+d \sin (e+f x)}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a + a*Sin[e + f*x]]/Sqrt[c + d*Sin[e + f*x]],x]

[Out]

((-I)*(Log[(2*(-1)^(1/4)*c - 2*(-1)^(3/4)*d*E^(I*(e + f*x)) + 2*Sqrt[d]*Sqrt[2*c*E^(I*(e + f*x)) - I*d*(-1 + E
^((2*I)*(e + f*x)))])/(Sqrt[d]*E^(I*e))] - Log[((-1 - I)*E^((I/2)*(e - 2*f*x))*(-((-1)^(1/4)*d) + (-1)^(3/4)*c
*E^(I*(e + f*x)) - Sqrt[d]*Sqrt[2*c*E^(I*(e + f*x)) - I*d*(-1 + E^((2*I)*(e + f*x)))])*f)/Sqrt[d]])*(Cos[(e +
f*x)/2] - I*Sin[(e + f*x)/2])*Sqrt[a*(1 + Sin[e + f*x])]*Sqrt[(Cos[e + f*x] + I*Sin[e + f*x])*(c + d*Sin[e + f
*x])])/(Sqrt[d]*f*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])*Sqrt[c + d*Sin[e + f*x]])

________________________________________________________________________________________

Maple [B]  time = 0.378, size = 2707, normalized size = 44.4 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sin(f*x+e))^(1/2)/(c+d*sin(f*x+e))^(1/2),x)

[Out]

-1/f/d^2/(-(d^2/c^2)^(1/2)*c)^(1/2)/(c^2-2*c*d+d^2)*(c+d*sin(f*x+e))^(1/2)*(a*(1+sin(f*x+e)))^(1/2)*(d*(c+d*si
n(f*x+e))/((d^2/c^2)^(1/2)*c*sin(f*x+e)+d))^(1/2)*(sin(f*x+e)*cos(f*x+e)*(d^2/c^2)^(1/2)*(-(d^2/c^2)^(1/2)*c)^
(1/2)*(((d^2/c^2)^(1/2)*c^4+6*(d^2/c^2)^(1/2)*d^2*c^2+d^4*(d^2/c^2)^(1/2)-4*c^2*d^2-4*d^4)*c)^(1/2)*arctan(((d
^2/c^2)^(1/2)*c^2-d^2)*c*((d^2/c^2)^(1/2)-1)/(((d^2/c^2)^(1/2)*c^4+6*(d^2/c^2)^(1/2)*d^2*c^2+d^4*(d^2/c^2)^(1/
2)-4*c^2*d^2-4*d^4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^(1/2)*c)^(1/2)*(d*(c+
d*sin(f*x+e))/((d^2/c^2)^(1/2)*c*sin(f*x+e)+d))^(1/2))*c^3*d^2+2*cos(f*x+e)^2*(d^2/c^2)^(1/2)*arctan(1/(-(d^2/
c^2)^(1/2)*c)^(1/2)*(d*(c+d*sin(f*x+e))/((d^2/c^2)^(1/2)*c*sin(f*x+e)+d))^(1/2))*c^2*d^3-cos(f*x+e)^2*(d^2/c^2
)^(1/2)*arctan(1/(-(d^2/c^2)^(1/2)*c)^(1/2)*(d*(c+d*sin(f*x+e))/((d^2/c^2)^(1/2)*c*sin(f*x+e)+d))^(1/2))*c*d^4
-sin(f*x+e)*(d^2/c^2)^(1/2)*arctan(1/(-(d^2/c^2)^(1/2)*c)^(1/2)*(d*(c+d*sin(f*x+e))/((d^2/c^2)^(1/2)*c*sin(f*x
+e)+d))^(1/2))*c^4*d+sin(f*x+e)*(d^2/c^2)^(1/2)*arctan(1/(-(d^2/c^2)^(1/2)*c)^(1/2)*(d*(c+d*sin(f*x+e))/((d^2/
c^2)^(1/2)*c*sin(f*x+e)+d))^(1/2))*c^3*d^2+sin(f*x+e)*(d^2/c^2)^(1/2)*arctan(1/(-(d^2/c^2)^(1/2)*c)^(1/2)*(d*(
c+d*sin(f*x+e))/((d^2/c^2)^(1/2)*c*sin(f*x+e)+d))^(1/2))*c^2*d^3-sin(f*x+e)*(d^2/c^2)^(1/2)*arctan(1/(-(d^2/c^
2)^(1/2)*c)^(1/2)*(d*(c+d*sin(f*x+e))/((d^2/c^2)^(1/2)*c*sin(f*x+e)+d))^(1/2))*c*d^4)/cos(f*x+e)/(cos(f*x+e)^2
*d^2+c^2-d^2)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sqrt{a \sin \left (f x + e\right ) + a}}{\sqrt{d \sin \left (f x + e\right ) + c}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^(1/2)/(c+d*sin(f*x+e))^(1/2),x, algorithm="maxima")

[Out]

integrate(sqrt(a*sin(f*x + e) + a)/sqrt(d*sin(f*x + e) + c), x)

________________________________________________________________________________________

Fricas [B]  time = 5.65712, size = 1825, normalized size = 29.92 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^(1/2)/(c+d*sin(f*x+e))^(1/2),x, algorithm="fricas")

[Out]

[1/4*sqrt(-a/d)*log((128*a*d^4*cos(f*x + e)^5 + a*c^4 + 4*a*c^3*d + 6*a*c^2*d^2 + 4*a*c*d^3 + a*d^4 + 128*(2*a
*c*d^3 - a*d^4)*cos(f*x + e)^4 - 32*(5*a*c^2*d^2 - 14*a*c*d^3 + 13*a*d^4)*cos(f*x + e)^3 - 32*(a*c^3*d - 2*a*c
^2*d^2 + 9*a*c*d^3 - 4*a*d^4)*cos(f*x + e)^2 - 8*(16*d^4*cos(f*x + e)^4 - c^3*d + 17*c^2*d^2 - 59*c*d^3 + 51*d
^4 + 24*(c*d^3 - d^4)*cos(f*x + e)^3 - 2*(5*c^2*d^2 - 26*c*d^3 + 33*d^4)*cos(f*x + e)^2 - (c^3*d - 7*c^2*d^2 +
 31*c*d^3 - 25*d^4)*cos(f*x + e) + (16*d^4*cos(f*x + e)^3 + c^3*d - 17*c^2*d^2 + 59*c*d^3 - 51*d^4 - 8*(3*c*d^
3 - 5*d^4)*cos(f*x + e)^2 - 2*(5*c^2*d^2 - 14*c*d^3 + 13*d^4)*cos(f*x + e))*sin(f*x + e))*sqrt(a*sin(f*x + e)
+ a)*sqrt(d*sin(f*x + e) + c)*sqrt(-a/d) + (a*c^4 - 28*a*c^3*d + 230*a*c^2*d^2 - 476*a*c*d^3 + 289*a*d^4)*cos(
f*x + e) + (128*a*d^4*cos(f*x + e)^4 + a*c^4 + 4*a*c^3*d + 6*a*c^2*d^2 + 4*a*c*d^3 + a*d^4 - 256*(a*c*d^3 - a*
d^4)*cos(f*x + e)^3 - 32*(5*a*c^2*d^2 - 6*a*c*d^3 + 5*a*d^4)*cos(f*x + e)^2 + 32*(a*c^3*d - 7*a*c^2*d^2 + 15*a
*c*d^3 - 9*a*d^4)*cos(f*x + e))*sin(f*x + e))/(cos(f*x + e) + sin(f*x + e) + 1))/f, 1/2*sqrt(a/d)*arctan(1/4*(
8*d^2*cos(f*x + e)^2 - c^2 + 6*c*d - 9*d^2 - 8*(c*d - d^2)*sin(f*x + e))*sqrt(a*sin(f*x + e) + a)*sqrt(d*sin(f
*x + e) + c)*sqrt(a/d)/(2*a*d^2*cos(f*x + e)^3 - (3*a*c*d - a*d^2)*cos(f*x + e)*sin(f*x + e) - (a*c^2 - a*c*d
+ 2*a*d^2)*cos(f*x + e)))/f]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sqrt{a \left (\sin{\left (e + f x \right )} + 1\right )}}{\sqrt{c + d \sin{\left (e + f x \right )}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))**(1/2)/(c+d*sin(f*x+e))**(1/2),x)

[Out]

Integral(sqrt(a*(sin(e + f*x) + 1))/sqrt(c + d*sin(e + f*x)), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sqrt{a \sin \left (f x + e\right ) + a}}{\sqrt{d \sin \left (f x + e\right ) + c}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^(1/2)/(c+d*sin(f*x+e))^(1/2),x, algorithm="giac")

[Out]

integrate(sqrt(a*sin(f*x + e) + a)/sqrt(d*sin(f*x + e) + c), x)